Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: Telephony /
Chapter 3 - Directory Numbers / Directory Number Reference
Directory Number Functions / Finding Directory Numbers


TELDNLookupByIndex

Finds a directory number by index in a terminal's list of directory numbers.

pascal TELErr TELDNLookupByIndex (
                     TELHandle hTEL, 
                     short dnType, 
                     Boolean physical, 
                     short index, 
                     TELDNHandle *hTELDN);
hTEL
A handle to a telephone record.
dnType
A type of directory number. See "Directory Number Types" on page 3-6 for a description of the available directory number types.
physical
A Boolean value that determines whether TELDNLookupByIndex considers all directory numbers (true) or only those to which commands can be sent (false).
index
An index in the list of directory numbers associated with the specified terminal. The value in this field must be between 1 and the number returned by the TELCountDNs function for corresponding values in the dnType and physical parameters.
hTELDN
On exit, a handle to a directory number structure for the directory number having the specified index. Your application is responsible for disposing of this handle when it's done using it.
function result
A result code.
DESCRIPTION
The TELDNLookupByIndex function returns, in the hTELDN parameter, a handle to a directory number structure for the directory number having the index specified by the index parameter in the list of directory numbers associated with the terminal specified by the hTEL parameter. If no directory number can be found having that index, hTELDN is set to nil.

You can restrict the search to a particular type of directory number by passing a suitable value in the dnType parameter. To search all directory numbers associated with the specified terminal, pass the value telAllDNs. If the physical parameter is true, TELDNLookupByIndex searches all directory numbers associated with that terminal, even those that are currently inaccessible (as indicated by the dnAccessible field of the directory number structure). If physical is false, TELDNLookupByIndex considers only those directory numbers that are currently accessible.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 DEC 1996



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help